package d0324;

import java.util.Arrays;

public class TestSort {
    public static void main(String[] args) {
        Product p1=new Product("臭豆腐",45.5,1);
        Product p2=new Product("奥里给",35.5,5);
        Product p3=new Product("美汁汁",25.5,6);
        Product p4=new Product("小汉堡",15.5,2);
        Product[]products=new Product[]{p1,p2,p3,p4};

        Arrays.sort(products);

        for(Product prod:products){
            System.out.println(prod);
        }
    }
}
